package Memento;

//存档类 存储状态
public class Memento {
    private  State state;

    public Memento(State playerState) {
        this.state=new State();
        System.out.println(playerState.life);
        this.state.life=playerState.life;
        this.state.magic=playerState.magic;
    }

    public State getState()
    {
        return state;
    }

    public void setState(State state)
    {
        this.state=state;
    }
}
